home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / Mine Sweeper / Source / mines.h < prev    next >
Text File  |  1991-03-30  |  2KB  |  78 lines

  1. /*    mines.h
  2.  *
  3.  *        Various globals
  4.  */
  5.  
  6. #ifndef __MINES__
  7. #define __MINES__
  8.  
  9. #define NUMSCORE                6        /* Number score slots    */
  10.  
  11. /****************************************************************/
  12. /*                                                                */
  13. /*                            Globals                                */
  14. /*                                                                */
  15. /****************************************************************/
  16.  
  17. extern short    SizeX;                    /* size bitmaps            */
  18. extern short    SizeY;
  19. extern short    SizeFlag;                /* Easy mode            */
  20. extern short    Bombs;                    /* # of bombs            */
  21. extern short    BombFlag;                /* Easy mode (again)    */
  22. extern short    BRatio;                    /* Bomb ratio            */
  23.  
  24. extern short    BStatus[40][40];        /* Bomb status            */
  25. extern short    BPosition[40][40];        /* Bomb info flags        */
  26. extern short    BState;                    /* Game state            */
  27. extern short    BFirst;                    /* First click?            */
  28. extern short    BCount;                    /* User bomb count        */
  29.  
  30. extern short    XLoc,YLoc;                /* X, Y window loc.        */
  31. extern long        LogTime;                /* What time is it?        */
  32. extern long        CurTime;                /* What time is it now?    */
  33.  
  34. extern short    Cruse;                    /* Cruse Control        */
  35.  
  36. extern WindowPtr MineWindow;            /* Mine window display    */
  37.  
  38. /*    ScoreRec
  39.  *
  40.  *        This is the structure of the high score record
  41.  */
  42.  
  43. typedef struct ScoreRec {
  44.     char        name[32];                /* Name buffer            */
  45.     long        time;                    /* Time                    */
  46. } ScoreRec;
  47.  
  48. /*    PrefFiles
  49.  *
  50.  *        These are how preferences are stored
  51.  */
  52.  
  53. typedef struct PrefFiles {
  54.     short        SizeX;                    /* Size of X            */
  55.     short        SizeY;                    /* Size of Y            */
  56.     short        SizeFlag;                /* Size Flag            */
  57.     short        BRatio;                    /* Bomb ratio            */
  58.     short        BombFlag;                /* Bomb flag            */
  59.     
  60.     short        XWindLoc;                /* X loc of window        */
  61.     short        YWindLoc;                /* Y loc of window        */
  62.     
  63.     ScoreRec    Scores[NUMSCORE];        /* High scores            */
  64.     
  65.     short        Cruse;                    /* Cruse Control        */
  66. } PrefFiles;
  67.  
  68. extern ScoreRec    Scores[NUMSCORE];        /* High scores            */
  69.  
  70. /****************************************************************/
  71. /*                                                                */
  72. /*                             Code                                */
  73. /*                                                                */
  74. /****************************************************************/
  75.  
  76.  
  77. #endif
  78.